package cn.kgcnews.dao;

import java.util.List;
import cn.kgcnews.pojo.NewsDetail;
/**
 * 新闻数据接口
 * @author 204
 *
 */
public interface NewsDao {
	/**
	 * 查询最新的前14条新闻
	 * @return
	 */
	public List<NewsDetail> queryNewsTop14() throws Exception;
	/**
	 * 查询指定Id的新闻对象
	 * @param nid
	 * @return
	 * @throws Exception
	 */
	public NewsDetail queryNewsByNId(String nid) throws Exception;
	
	/**
	 * 保存新闻
	 * @param news
	 * @return
	 * @throws Exception
	 */
	public int addNews(NewsDetail news) throws Exception;
	/**
	 * 查询新闻的总记录数
	 * @return
	 * @throws Exception
	 */
	public int queryTotalRecord(String searchTitle,int searchTId) throws Exception;
	/**
	 * 分页查询
	 * @param offSet 偏移量
	 * @param pageSize 每页的记录数
	 * @return
	 * @throws Exception
	 */
	public List<NewsDetail> queryNewsByOffset(int offSet,int pageSize,String searchTitle,int searchTId) throws Exception;
	
	
	public int delDetailByNid(Integer nid)throws Exception;
	
	
	
	
	
	
	
	
}
